package msu.ml.data;

import msu.ml.core.*;
import weka.core.*;

/**
 *
 * The IDataPostProcessor interface provides a means
 * by which to do something useful with the results of
 * an experiment. This interface allows data to be 
 * processed on a per Instance basis, per Instances
 * basis or on a per Experiment basis.
 *
 * @author Reginald M Mead
 * @version 1.0
 */
public interface IDataPostProcessor 
{

   void setExperiment(Experiment e);
   Experiment getExperiment();
   
   /** Signals the beginning of an experiment to the
	* data processor. The data processor in turn does
	* any pre experiment initialization.
	*/
   void beginExperiment(Experiment e);

   /**
   * Signals that training has begun;
   * 
   * @param labels training data labels
   */
   void beginTraining(String [] labels);

   /** Signals the beginning of a set of instances or
	* a sweep.
	* @param name Instances name (usually a file name)
	*/
   void beginInstances(String name);


   /** Signals the end of an experiment
	*/
   void endExperiment();


   /** Signals the end of a set of instances
	*/
   void endInstances();

   /**
	* Process gets called each time an instance is given
	* a class distribution.
	* @param data The instance that has just been assigned a distribution
	* @param distribution The probability distribution for potential classes
	*/
   void process(Instance data, double [] distribution);
}
